home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13519 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 61 74 68 | 65 6e 65 2e 63 6f 2e 75 |news.ath|ene.co.u|
|00000030| 6b 21 6e 6f 74 2d 66 6f | 72 2d 6d 61 69 6c 0a 46 |k!not-fo|r-mail.F|
|00000040| 72 6f 6d 3a 20 22 43 2e | 4a 2e 20 53 63 61 69 66 |rom: "C.|J. Scaif|
|00000050| 65 22 20 3c 4a 4f 4c 54 | 53 57 49 46 54 40 41 74 |e" <JOLT|SWIFT@At|
|00000060| 68 65 6e 65 2e 63 6f 2e | 75 6b 3e 0a 53 75 62 6a |hene.co.|uk>.Subj|
|00000070| 65 63 74 3a 20 52 65 3a | 20 57 68 61 74 27 73 20 |ect: Re:| What's |
|00000080| 6d 65 61 6e 20 61 62 6f | 75 74 20 27 2e 2e 2e 27 |mean abo|ut '...'|
|00000090| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 33 31 |.Message|-ID: <31|
|000000a0| 35 36 46 46 41 38 2e 44 | 35 40 41 74 68 65 6e 65 |56FFA8.D|5@Athene|
|000000b0| 2e 63 6f 2e 75 6b 3e 0a | 44 61 74 65 3a 20 4d 6f |.co.uk>.|Date: Mo|
|000000c0| 6e 2c 20 32 35 20 4d 61 | 72 20 31 39 39 36 20 32 |n, 25 Ma|r 1996 2|
|000000d0| 30 3a 31 38 3a 34 38 20 | 2b 30 30 30 30 0a 52 65 |0:18:48 |+0000.Re|
|000000e0| 66 65 72 65 6e 63 65 73 | 3a 20 3c 34 69 72 36 70 |ferences|: <4ir6p|
|000000f0| 65 24 72 75 62 40 6e 65 | 77 73 2e 61 73 69 61 6f |e$rub@ne|ws.asiao|
|00000100| 6e 6c 69 6e 65 2e 6e 65 | 74 3e 0a 4f 72 67 61 6e |nline.ne|t>.Organ|
|00000110| 69 7a 61 74 69 6f 6e 3a | 20 4a 6f 6c 74 53 77 69 |ization:| JoltSwi|
|00000120| 66 74 20 4c 74 64 2e 0a | 58 2d 4d 61 69 6c 65 72 |ft Ltd..|X-Mailer|
|00000130| 3a 20 4d 6f 7a 69 6c 6c | 61 20 32 2e 30 47 6f 6c |: Mozill|a 2.0Gol|
|00000140| 64 42 31 20 28 57 69 6e | 39 35 3b 20 49 29 0a 4d |dB1 (Win|95; I).M|
|00000150| 49 4d 45 2d 56 65 72 73 | 69 6f 6e 3a 20 31 2e 30 |IME-Vers|ion: 1.0|
|00000160| 0a 54 6f 3a 20 57 6f 6e | 67 20 43 68 69 20 59 61 |.To: Won|g Chi Ya|
|00000170| 74 20 3c 63 79 77 6f 6e | 67 40 61 73 69 61 6f 6e |t <cywon|g@asiaon|
|00000180| 6c 69 6e 65 2e 6e 65 74 | 3e 0a 43 6f 6e 74 65 6e |line.net|>.Conten|
|00000190| 74 2d 54 79 70 65 3a 20 | 74 65 78 74 2f 70 6c 61 |t-Type: |text/pla|
|000001a0| 69 6e 3b 20 63 68 61 72 | 73 65 74 3d 75 73 2d 61 |in; char|set=us-a|
|000001b0| 73 63 69 69 0a 43 6f 6e | 74 65 6e 74 2d 54 72 61 |scii.Con|tent-Tra|
|000001c0| 6e 73 66 65 72 2d 45 6e | 63 6f 64 69 6e 67 3a 20 |nsfer-En|coding: |
|000001d0| 37 62 69 74 0a 0a 57 6f | 6e 67 20 43 68 69 20 59 |7bit..Wo|ng Chi Y|
|000001e0| 61 74 20 77 72 6f 74 65 | 3a 0a 3e 20 0a 3e 20 43 |at wrote|:.> .> C|
|000001f0| 6f 75 6c 64 20 79 6f 75 | 20 74 65 6c 6c 20 6d 65 |ould you| tell me|
|00000200| 20 77 68 61 74 27 73 20 | 6d 65 61 6e 20 61 62 6f | what's |mean abo|
|00000210| 75 74 20 22 2e 2e 2e 22 | 20 77 68 69 63 68 20 69 |ut "..."| which i|
|00000220| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 43 20 6c |s define|d in C l|
|00000230| 61 6e 67 75 61 67 65 0a | 3e 20 70 72 6f 63 65 64 |anguage.|> proced|
|00000240| 75 72 65 2c 20 65 2e 67 | 2e 20 76 6f 69 64 20 74 |ure, e.g|. void t|
|00000250| 65 73 74 28 63 68 61 72 | 20 2a 74 2c 20 2e 2e 2e |est(char| *t, ...|
|00000260| 29 0a 3e 20 0a 3e 20 49 | 20 77 69 73 68 20 79 6f |).> .> I| wish yo|
|00000270| 75 20 63 6f 75 6c 64 20 | 74 65 6c 6c 20 6d 65 20 |u could |tell me |
|00000280| 68 6f 77 20 74 6f 20 69 | 6d 70 6c 65 6d 65 6e 74 |how to i|mplement|
|00000290| 3f 0a 3e 20 0a 3e 20 54 | 68 61 6e 6b 20 79 6f 75 |?.> .> T|hank you|
|000002a0| 20 76 65 72 79 20 6d 75 | 63 68 3f 0a 3e 20 0a 3e | very mu|ch?.> .>|
|000002b0| 20 65 2d 6d 61 69 6c 3a | 20 63 79 77 6f 6e 67 40 | e-mail:| cywong@|
|000002c0| 61 73 69 61 6f 6e 6c 69 | 6e 65 2e 6e 65 74 0a 0a |asiaonli|ne.net..|
|000002d0| 0a 49 6e 20 43 20 61 6e | 64 20 43 2b 2b 20 22 2e |.In C an|d C++ ".|
|000002e0| 2e 2e 22 20 69 73 20 74 | 68 65 20 65 6c 6c 69 70 |.." is t|he ellip|
|000002f0| 73 69 73 20 28 61 6e 63 | 69 65 6e 74 20 67 72 65 |sis (anc|ient gre|
|00000300| 65 6b 20 6d 65 61 6e 69 | 6e 67 20 22 6c 65 66 74 |ek meani|ng "left|
|00000310| 20 6f 75 74 22 29 2e 0a | 49 74 20 69 73 20 75 73 | out")..|It is us|
|00000320| 65 64 20 74 6f 20 69 6e | 64 69 63 61 74 65 20 75 |ed to in|dicate u|
|00000330| 6e 73 70 65 63 69 66 69 | 65 64 20 61 64 64 69 74 |nspecifi|ed addit|
|00000340| 69 6f 6e 61 6c 20 70 61 | 72 61 6d 65 74 65 72 73 |ional pa|rameters|
|00000350| 20 69 6e 20 66 75 6e 63 | 74 69 6f 6e 73 0a 61 6e | in func|tions.an|
|00000360| 64 20 61 6c 6c 6f 77 73 | 20 6f 6e 65 20 74 6f 20 |d allows| one to |
|00000370| 77 72 69 74 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |write fu|nctions |
|00000380| 6c 69 6b 65 20 70 72 69 | 6e 74 66 28 29 20 77 68 |like pri|ntf() wh|
|00000390| 69 63 68 20 63 61 6e 20 | 68 61 76 65 20 61 0a 76 |ich can |have a.v|
|000003a0| 61 72 69 61 62 6c 65 20 | 6e 75 6d 62 65 72 20 6f |ariable |number o|
|000003b0| 66 20 61 72 67 75 6d 65 | 6e 74 73 20 28 61 6e 64 |f argume|nts (and|
|000003c0| 20 61 6c 73 6f 20 74 6f | 20 61 76 6f 69 64 20 70 | also to| avoid p|
|000003d0| 61 72 61 6d 65 74 65 72 | 20 74 79 70 65 0a 63 68 |arameter| type.ch|
|000003e0| 65 63 6b 69 6e 67 20 62 | 79 20 74 68 65 20 63 6f |ecking b|y the co|
|000003f0| 6d 70 69 6c 65 72 29 2e | 20 48 65 72 65 20 69 73 |mpiler).| Here is|
|00000400| 20 61 20 73 69 6d 70 6c | 65 20 65 78 61 6d 70 6c | a simpl|e exampl|
|00000410| 65 20 6f 66 20 68 6f 77 | 20 74 6f 20 64 6f 20 74 |e of how| to do t|
|00000420| 68 69 73 3a 0a 0a 23 69 | 6e 63 6c 75 64 65 20 3c |his:..#i|nclude <|
|00000430| 73 74 64 61 72 67 2e 68 | 3e 20 2f 2f 20 76 61 72 |stdarg.h|> // var|
|00000440| 69 61 62 6c 65 20 61 72 | 67 75 6d 65 6e 74 20 68 |iable ar|gument h|
|00000450| 61 6e 64 6c 69 6e 67 20 | 66 61 63 69 6c 69 74 69 |andling |faciliti|
|00000460| 65 73 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |es.#incl|ude <std|
|00000470| 69 6f 2e 68 3e 20 2f 2f | 20 5f 76 73 6e 70 72 69 |io.h> //| _vsnpri|
|00000480| 6e 74 66 28 29 0a 0a 2f | 2f 20 45 78 61 6d 70 6c |ntf()../|/ Exampl|
|00000490| 65 20 6f 66 20 61 20 66 | 75 6e 63 74 69 6f 6e 20 |e of a f|unction |
|000004a0| 74 68 61 74 20 74 61 6b | 65 73 20 61 20 76 61 72 |that tak|es a var|
|000004b0| 69 61 62 6c 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |iable nu|mber of |
|000004c0| 61 72 67 75 6d 65 6e 74 | 73 0a 76 6f 69 64 20 6d |argument|s.void m|
|000004d0| 79 70 72 69 6e 74 66 28 | 63 68 61 72 20 2a 46 6d |yprintf(|char *Fm|
|000004e0| 74 20 2e 2e 2e 29 20 7b | 0a 09 76 61 5f 6c 69 73 |t ...) {|..va_lis|
|000004f0| 74 20 41 72 67 3b 20 2f | 2f 20 22 70 6f 69 6e 74 |t Arg; /|/ "point|
|00000500| 65 72 22 20 69 6e 20 61 | 72 67 75 6d 65 6e 74 20 |er" in a|rgument |
|00000510| 6c 69 73 74 0a 09 76 61 | 5f 73 74 61 72 74 28 41 |list..va|_start(A|
|00000520| 72 67 2c 20 46 6d 74 29 | 3b 20 2f 2f 20 73 65 74 |rg, Fmt)|; // set|
|00000530| 20 75 70 20 61 72 67 75 | 6d 65 6e 74 20 6c 69 73 | up argu|ment lis|
|00000540| 74 20 70 6f 69 6e 74 65 | 72 0a 09 76 70 72 69 6e |t pointe|r..vprin|
|00000550| 74 66 28 46 6d 74 2c 20 | 41 72 67 29 3b 20 2f 2f |tf(Fmt, |Arg); //|
|00000560| 20 75 73 65 20 61 72 67 | 75 6d 65 6e 74 73 0a 09 | use arg|uments..|
|00000570| 76 61 5f 65 6e 64 28 41 | 72 67 29 3b 20 2f 2f 20 |va_end(A|rg); // |
|00000580| 66 69 6e 69 73 68 65 64 | 20 77 69 74 68 20 61 72 |finished| with ar|
|00000590| 67 20 6c 69 73 74 20 70 | 6f 69 6e 74 65 72 0a 7d |g list p|ointer.}|
|000005a0| 0a 0a 2d 2d 20 0a 57 72 | 69 74 74 65 6e 20 62 79 |..-- .Wr|itten by|
|000005b0| 20 43 68 72 69 73 20 53 | 63 61 69 66 65 2e 0a 46 | Chris S|caife..F|
|000005c0| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 20 |or more |details |
|000005d0| 73 65 65 20 6d 79 20 68 | 6f 6d 65 20 70 61 67 65 |see my h|ome page|
|000005e0| 3a 20 0a 68 74 74 70 3a | 2f 2f 77 77 77 2e 41 74 |: .http:|//www.At|
|000005f0| 68 65 6e 65 2e 63 6f 2e | 75 6b 2f 4a 6f 6c 74 73 |hene.co.|uk/Jolts|
|00000600| 77 69 66 74 2f 50 31 2e | 68 74 6d 0a 0a |wift/P1.|htm.. |
+--------+-------------------------+-------------------------+--------+--------+